/**
 *	\file CDSQPlayer.h
 *  
 *  \section desc_sec Description
 *  Description
 *  
 *  \if copyright
 *  	Copyright 2008 Jeffrey Zhang. All rights reserved.
 *  \endif
 *  
 *  \section hist_sec Change History:
 *  	-	2/11/08		Jeffrey Zhang		Created this file
 *  
 *  <hr>
 *  \addtogroup AKCPP
 *  @{
 */
#ifndef _CDSQPLAYER_H
#define _CDSQPLAYER_H

#include "AbstractClasses.h"
#include "CDSQBaseInfo.h"

class CAlgSearchEngine;
class CDSQBoard;

class CDSQPlayer : public AKCPPPlayer
{
	typedef AKCPPPlayer PARENT;
public:
	CDSQPlayer(AKSideIndex aSide, unsigned int aNumOfSides);
	virtual ~CDSQPlayer(void);
	
	// State
	virtual void backToInitialState();
	virtual bool performMove(const AKMove newMove);
	virtual bool canUndo();
	virtual bool undo();
	
	// Player
	virtual const AKMove getBestMove();
	virtual const AKMove getAlternativeMove();
	
	virtual void setSearchDepth(Level newDepth);
	virtual Level getSearchDepth() const;

	void setSearchEngine(CAlgSearchEngine* pEngine);
	CAlgSearchEngine* getSearchEngine();

protected:
	//inline const AKMove ToAKMove(const PieceMove&);
	
private:
	
	CDSQBoard* m_pBoard;
	CAlgSearchEngine* m_pEngine;

	AKMove lastMove;
	AKPieceIndex undotype;
	
	//bool hasAlternative;
};

#endif // _CDSQPLAYER_H

/** @} */

